<?php
class ImgEditorController extends Controller {
	public function index() {
		$this->getSmarty ();

			
		$this->smarty->display ( "img/imgEditor.tpl" );
	}
	public function uploads() {
		if (!empty($_FILES)) {
			$dirroot = PROJECT.DS."upload".DS;//上传路径
			$filename = explode ( ".", $_FILES ['file'] ['name'] );
			$filename [0] =  date ( 'Y-m-d-H-i-s' ) . "-" . rand (); // 设置随机数长度
			$file_name = implode ( ".", $filename );
			$uploadfile = $dirroot . $file_name;
			move_uploaded_file ( $_FILES ['file'] ['tmp_name'], $uploadfile );
		}
	}

}